package com.iris.live.services.data.models;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * Created by HangLiu on 2017/2/13.
 */
@Entity
@Table(name = "insurance_endorsement_log", schema = "live", catalog = "")
public class InsuranceEndorsementLogModel {
    private Integer id;
    private String endorsementCode;
    private String orgQuoteId;
    private String insuranceName;
    private Integer yearNum;
    private String parameter;
    private String iop;
    private String subParameter;
    private BigDecimal orgPrice;
    private BigDecimal finPrice;
    private String updateUser;
    private Timestamp updateTime;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "endorsement_code")
    public String getEndorsementCode() {
        return endorsementCode;
    }

    public void setEndorsementCode(String endorsementCode) {
        this.endorsementCode = endorsementCode;
    }

    @Basic
    @Column(name = "org_quote_id")
    public String getOrgQuoteId() {
        return orgQuoteId;
    }

    public void setOrgQuoteId(String orgQuoteId) {
        this.orgQuoteId = orgQuoteId;
    }

    @Basic
    @Column(name = "insurance_name")
    public String getInsuranceName() {
        return insuranceName;
    }

    public void setInsuranceName(String insuranceName) {
        this.insuranceName = insuranceName;
    }

    @Basic
    @Column(name = "year_num")
    public Integer getYearNum() {
        return yearNum;
    }

    public void setYearNum(Integer yearNum) {
        this.yearNum = yearNum;
    }

    @Basic
    @Column(name = "parameter")
    public String getParameter() {
        return parameter;
    }

    public void setParameter(String parameter) {
        this.parameter = parameter;
    }

    @Basic
    @Column(name = "iop")
    public String getIop() {
        return iop;
    }

    public void setIop(String iop) {
        this.iop = iop;
    }

    @Basic
    @Column(name = "sub_parameter")
    public String getSubParameter() {
        return subParameter;
    }

    public void setSubParameter(String subParameter) {
        this.subParameter = subParameter;
    }

    @Basic
    @Column(name = "org_price")
    public BigDecimal getOrgPrice() {
        return orgPrice;
    }

    public void setOrgPrice(BigDecimal orgPrice) {
        this.orgPrice = orgPrice;
    }

    @Basic
    @Column(name = "fin_price")
    public BigDecimal getFinPrice() {
        return finPrice;
    }

    public void setFinPrice(BigDecimal finPrice) {
        this.finPrice = finPrice;
    }

    @Basic
    @Column(name = "update_user")
    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    @Basic
    @Column(name = "update_time")
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        InsuranceEndorsementLogModel that = (InsuranceEndorsementLogModel) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (endorsementCode != null ? !endorsementCode.equals(that.endorsementCode) : that.endorsementCode != null)
            return false;
        if (orgQuoteId != null ? !orgQuoteId.equals(that.orgQuoteId) : that.orgQuoteId != null) return false;
        if (insuranceName != null ? !insuranceName.equals(that.insuranceName) : that.insuranceName != null)
            return false;
        if (yearNum != null ? !yearNum.equals(that.yearNum) : that.yearNum != null) return false;
        if (parameter != null ? !parameter.equals(that.parameter) : that.parameter != null) return false;
        if (iop != null ? !iop.equals(that.iop) : that.iop != null) return false;
        if (subParameter != null ? !subParameter.equals(that.subParameter) : that.subParameter != null) return false;
        if (orgPrice != null ? !orgPrice.equals(that.orgPrice) : that.orgPrice != null) return false;
        if (finPrice != null ? !finPrice.equals(that.finPrice) : that.finPrice != null) return false;
        if (updateUser != null ? !updateUser.equals(that.updateUser) : that.updateUser != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (endorsementCode != null ? endorsementCode.hashCode() : 0);
        result = 31 * result + (orgQuoteId != null ? orgQuoteId.hashCode() : 0);
        result = 31 * result + (insuranceName != null ? insuranceName.hashCode() : 0);
        result = 31 * result + (yearNum != null ? yearNum.hashCode() : 0);
        result = 31 * result + (parameter != null ? parameter.hashCode() : 0);
        result = 31 * result + (iop != null ? iop.hashCode() : 0);
        result = 31 * result + (subParameter != null ? subParameter.hashCode() : 0);
        result = 31 * result + (orgPrice != null ? orgPrice.hashCode() : 0);
        result = 31 * result + (finPrice != null ? finPrice.hashCode() : 0);
        result = 31 * result + (updateUser != null ? updateUser.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        return result;
    }
}
